﻿<p>
This example shows how to create templated columns for Telerik Grid for ASP.NET MVC. Templates allow you to customize
the way the data is presented in the grid. Currently templates are supported only in server binding mode. Client-side
templates will be implemented in a subsequent release. Also currently you cannot sort or filter by template column.
</p>
<p>
    To set the template for a column you should use the <code>Template</code> method.
</p>
<pre class="prettyprint">
&lt;% Html.Telerik().Grid(Model)
        .Name("Grid")
        .Columns(columns => 
        {
            //Template column. The grid displays the HTML defined by the argument.
            <em>columns.Template(c => {
            %&gt;
                &lt;img 
                    alt="&lt;%= c.CustomerID %&gt;" 
                    src="&lt%= Url.Content("~/Content/Grid/Customers/" + c.CustomerID + ".jpg") %&gt;" 
                  /&gt;
            &lt;%
            });</em>
            //Regular databound column. The grid displays the value of the CustomerID property.
            columns.Bound(c => c.CustomerID);
        })
        .Render();
 %&gt;
</pre>